import coldMeter from '../../../../public/canvas-board/coldMeter.png';
import eleMeter from '../../../../public/canvas-board/eleMeter.png';
import flowMeter from '../../../../public/canvas-board/flowMeter.png';
import hostMachOn from '../../../../public/canvas-board/hostMach.a.png';
import hostMachOff from '../../../../public/canvas-board/hostMach.b.png';
import hostMach from '../../../../public/canvas-board/hostMach.png';
import pressureMeter from '../../../../public/canvas-board/pressureMeter.png';
import smartValve from '../../../../public/canvas-board/smartValve.png';
import valve from '../../../../public/canvas-board/valve.png';
import waterCollector from '../../../../public/canvas-board/waterCollector.png';
import waterDispatcher from '../../../../public/canvas-board/waterDispatcher.png';
import waterMeter from '../../../../public/canvas-board/waterMeter.png';
import waterPumpOn from '../../../../public/canvas-board/waterPump.a.png';
import waterPumpOff from '../../../../public/canvas-board/waterPump.b.png';
import waterPump from '../../../../public/canvas-board/waterPump.png';
import waterTowerOn from '../../../../public/canvas-board/waterTower.a.png';
import waterTowerOff from '../../../../public/canvas-board/waterTower.b.png';
import waterTower from '../../../../public/canvas-board/waterTower.png';
let obj = {};
(function(originArr, pathArr){
            originArr.forEach((name, index)=>{
                let temp = name.split('.');    
                if ( !obj[temp[0]] ) {
                    obj[temp[0]] = { path:null, onPath:null, offPath:null };
                }
                if ( temp.length > 2 ) {
                    if ( temp[1] === 'a' ) {
                        obj[temp[0]].onPath = pathArr[index];
                    } else {
                        obj[temp[0]].offPath = pathArr[index];
                    }
                } else {
                    obj[temp[0]].path = pathArr[index];
                }
            });
        })(["coldMeter.png","eleMeter.png","flowMeter.png","hostMach.a.png","hostMach.b.png","hostMach.png","pressureMeter.png","smartValve.png","valve.png","waterCollector.png","waterDispatcher.png","waterMeter.png","waterPump.a.png","waterPump.b.png","waterPump.png","waterTower.a.png","waterTower.b.png","waterTower.png"], [coldMeter,eleMeter,flowMeter,hostMachOn,hostMachOff,hostMach,pressureMeter,smartValve,valve,waterCollector,waterDispatcher,waterMeter,waterPumpOn,waterPumpOff,waterPump,waterTowerOn,waterTowerOff,waterTower]);
export let modelsPath = obj;
export let modelsMap = {
            'coldMeter':{ title:'冷量计', width:378, height:103 },
            'eleMeter':{ title:'电表', width:67, height:80 },
            'flowMeter':{ title:'流量计', width:76, height:92 },
            'hostMach':{ title:'制冷主机', width:210, height:113 },
            'pressureMeter':{ title:'压力计', width:100, height:154 },
            'smartValve':{ title:'智能阀', width:720, height:720 },
            'valve':{ title:'阀', width:84, height:52 },
            'waterCollector':{ title:'集水器', width:192, height:69 },
            'waterDispatcher':{ title:'分水器', width:192, height:69 },
            'waterMeter':{ title:'水表', width:797, height:579 },
            'waterPump':{ title:'水泵', width:51, height:67 },
            'waterTower':{ title:'冷却塔', width:96, height:140 }
        };
